The present invention relates in general to a database processing method and a system for processing a database, and more particularly to a database processing method and a system in which an index access is carried out using a user definition function by which a data type and its behavior can be defined by a user.
Currently, in a database language SQL, the standardization of an SQL3 (ISO, ANSI) has been promoted. As one of the primary functions of the SQL3, there is an ADT (Abstract Data Type).
By the ADT is meant a data type to be defined by some user definition wherein the object-oriented concept is introduced thereinto, and the operation for the ADT data is defined in the form of a method (a function or a procedure) by a user. If the ADT is employed, then it is possible to implement the complicated data structure as data in the database. In addition, the behaviour (accompanying function) of the ADT data can be defined in the form of an ADT function.
In the definition of the ADT, both the specification of the attributes used to express the ADT value, and the specification of the ADT functions used to implement the behaviour thereof are defined. The ADT definition information is, similarly to table definition information and the like, managed as the dictionary information in a database management system in many cases.
For the definition of the ADT function, it is also possible to specify a module which is described with a general programming language such as an SQL itself or a C language to be compiled in order to be registered in a system. The relation between the program module used to implement the ADT function and the ADT function is described in an ADT definition statement for defining the ADT (e.g., a CREATE TYPE statement in the SQL).
The use of the ADT results in the function coping with the multimedia data being able to be implemented in the form of a function of the database management system. This means that the processing which has been conventionally executed with an application program can be implemented in the database system at a high speed and with a low development cost.
On the other hand, in a general search system, in order to implement a certain special function at a high speed, the access method unique to that function is utilized in many cases. As a typical one, an index is given as an example.
For example, in a full text search system, there is used a dedicated index which is constituted by keywords extracted from the documents for search some keywords in documents at a high speed, a character component table or the like. In addition, in many database management systems, by using an access method such as a B-tree index self-contained in the system, the promotion of a user query processing, i.e., a retrieval processing has been made.
With respect to the ADT data as well, there can be considered the utilization of a special index for implementing the evaluation peculiar to a certain ADT, i.e., the retrieval evaluation or the high speed evaluation (retrieval evaluation). In order to have sufficiently the benefits of the ADT, however, the means for adding an access method of the user definition, i.e., an index is required for the database management system.
Now, in the conventional database processing method, as for one approach of adding the user-defined index, there is given as an example a method wherein an access method to implement the ADT function at a high speed is contained in the module for implementing the ADT function. In this case, however, since the module for implementing the ADT function has a function of accessing to the user-defined index, the user definition index of interest is fastened to the ADT, and hence will lose the independency for the ADT.
Therefore, in the above-mentioned conventional database processing method, if the function of accessing to the user definition index is self-contained in the ADT function, then, there arises a problem that however usefully and generally the index is designed, that index can not be utilized from other ADTs.
In addition, it is impossible to support the indexes coping with all the data such as not only the B-tree index, but also the index for text search or the index for image search, within the above-mentioned conventional database management system. Then, there arises another problem that if the indexes coping with many data are supported, then the database management system will become larger in scale, and hence all the worse, the unnecessary index module will be self-contained for some users'.